<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Test For DataU</title>
    <script type="text/javascript" src="/js/jquery-1.11.3.js"></script>
    <link href="/css/globle.css" rel="stylesheet"/>
    <script>
        $(function () {
            checkUrl();
        });

        function checkUrl() {
            $(".a_url").each(function () {
                var url = $(this).attr("href");
                checkOneUrl(url, this);
            })
        }

        function checkOneUrl(url, dom) {
            $.ajax({
                type: "get",
                url: "/project/checkUrl?url="+url,
                dataType:'text',
                success: function (msg) {
                    if (msg === "200") {
                        $(dom).text("访问成功");
                    } else {
                        $(dom).text(msg);
                    }
                }
            });
        }

    </script>
</head>
<body>

<div th:include="header"></div>
<br>

<h2>Projects</h2>

<form action="/rel/addProjectForServer" method="post">

    <h4>请选择新增配对</h4>

    <div id="links_module">
        <select name="serverId">
            <OPTION th:each="s:${servers}" th:value="${s.id}" th:text="${s.type.name}+'--'+${s.ip}">服务器ip
            </OPTION>
        </select>
        ---
        <select name="projectId">
            <OPTION th:each="p:${projects}" th:value="${p.id}" th:text="${p.name}">项目名称
            </OPTION>
        </select>
        <br>
    </div>

    <br>

    <input type="submit" value="新增该配对" class="btn blue">

</form>

</body>
</html>